<%-- 
    Document   : SaleProducts
    Created on : Mar 24, 2012, 12:04:54 PM
    Author     : Y.Yang
--%>

<%@page import="sale.InsertSell"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page 
    language = "java" 
    import = "sale.InsertSell, search.Product"
%>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        
        <%
        
          //int IDofProd = 0;

        String product_name = request.getParameter("product_name");
        String product_description = request.getParameter("product_description");
        String price = request.getParameter("product_price");
        String amount = request.getParameter("product_amount");
        String user_name=request.getParameter("user_name");
        String partNumber=request.getParameter("part_number");
        String manufacturer = request.getParameter("product_manufacture");
        String pic="ISMI.jpg";
        
        product_name = product_name.trim();
        product_description = product_description.trim();
        price = price.trim();
        amount = amount.trim();
        partNumber=partNumber.trim();
        manufacturer=manufacturer.trim();         
        user_name = user_name.trim();
        InsertSell insertSell=new InsertSell();
        insertSell.connect();
        
        insertSell.SaleProd(product_name, product_description, price, amount,user_name, partNumber,manufacturer,pic);
        insertSell.disconnect();
        %>
        
        <h2>Congratulation!</h2>
        <br>
        Click here to sale another <a href="Salenew.jsp">
        product</a>.
    </body>\
</html>
